home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
System
/
Sample 2.4 Think C distribution
/
unmount.c
< prev
next >
Wrap
Text File
|
1990-07-10
|
1KB
|
32 lines
/*
;_____________________________________________________________________
;
; unmount.a - UnmountVol Trap Patch.
;
; Copyright © 1988, 1989, 1990 Northwestern University. Permission is granted
; to use this code in your own projects, provided you give credit to both
; John Norstad and Northwestern University in your about box or document.
;
; This routine is used to patch the UnmountVol trap when the standard
; save file dialog is presented if the report becomes full during a
; disk scan. It simply returns to the caller with the function result
; noErr, preventing the volume unmount. (See routine DoSave in main.c).
;
; The problem is that the standard file package attempts to unmount
; volumes before returning to the caller. We must prevent this during
; disk scans.
;
; Entry: (a0) = pointer to parameter block.
;
; Exit: (d0) = function result = noErr.
;_____________________________________________________________________
*/
#include "unmount.h"
OSErr UNMOUNT(void)
{
asm {
clr.w d0
}
}